import {GET_GOODS_LIST} from "../action/actionType"
const inState={
    goodList:[],
    goods:[]
}

export default function(state=inState,action){
    let newState=JSON.parse(JSON.stringify(state))
    switch (action.type) {
        case GET_GOODS_LIST:
            newState.goodList=action.payload
            newState.goods=action.payload.pics

           return newState
        default:
            return state
    }
}